﻿using System.Configuration;

namespace FileDistributor.Configuration
{
    public class FileDistributorSection : ConfigurationSection
    {
        [ConfigurationProperty("ftpServerConnections", IsRequired = true, IsDefaultCollection = false)]
        public FtpServerConnectionElementCollection FtpServerConnections
        {
            get
            {
                var ftpServerConnnections = (FtpServerConnectionElementCollection)base["ftpServerConnections"];
                return ftpServerConnnections;
            }
        }

        [ConfigurationProperty("pickupLocations", IsRequired = true, IsDefaultCollection = false)]
        public PickupLocationElementCollection PickupLocations
        {
            get
            {
                var pickupLocationsElement = (PickupLocationElementCollection)base["pickupLocations"];
                return pickupLocationsElement;
            }
        }

        [ConfigurationProperty("monitor", IsRequired = true)]
        public MonitorElement Monitor
        {
            get
            {
                return (MonitorElement)this["monitor"];
            }
        }

        [ConfigurationProperty("mailNotification", IsRequired = true, IsDefaultCollection = false)]
        public MailNotificationElement MailNotification
        {
            get
            {
                var mailNotification = (MailNotificationElement)base["mailNotification"];
                return mailNotification;
            }
        }

        [ConfigurationProperty("xmlns", IsRequired = false)]
        public string XmlNamespace
        {
            get
            {
                return "http://ts.distributor.configuration.distributorSection";
            }
        }
 


    }
}
